home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / bb2000 / files / BlueGame.dxr / 00179_movingBubbleScript.ls < prev    next >
Encoding:
Text File  |  1998-02-20  |  718 b   |  33 lines

  1. property ancestor
  2. global BUBBLESPRITES, gCarObj
  3.  
  4. on new me
  5.   set ancestor to new(script "bubbleScript")
  6.   return me
  7. end
  8.  
  9. on customstepframe me
  10.   mainRoutine(me)
  11. end
  12.  
  13. on mainRoutine me
  14.   set horPos to the locH of sprite the CAR of gCarObj
  15.   set verPos to the locV of sprite the CAR of gCarObj
  16.   if horPos < 280 then
  17.     set xPos to horPos + 15
  18.     set hCode to 4
  19.   else
  20.     set xPos to horPos - 15
  21.     set hCode to 2
  22.   end if
  23.   if verPos < 180 then
  24.     set yPos to verPos + 15
  25.     set vCode to 1
  26.   else
  27.     set yPos to verPos - 15
  28.     set vCode to 3
  29.   end if
  30.   set the loc of sprite the spritenum of me to point(xPos, yPos)
  31.   set the member of sprite the spritenum of me to member ("roll" & vCode & hCode & ".PCT")
  32. end
  33.